#!/usr/bin/env bash

npm run b
NODE_ENV=production node deploy/archive

scp  dist.zip root@106.55.60.161:/root/node-app
ssh root@106.55.60.161  << EOF
    cd /root/node-app;
    rm -rf api-ice/dist
    unzip -o -d api-ice dist.zip;
    cd api-ice;
    bash deploy/start.sh;
    exit;
EOF
